-- GENERATED SPELL FOR [Scarlet Highlord Daion] --


function spell0_32417(pUnit, Event) --@Bloodthirst,n/a--
pUnit:FullCastSpellOnTarget(35949,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32417', 0, 1)
end

function spell1_32417(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(48281,pUnit)
pUnit:RegisterEvent('Sorts_32417', 3348, 1)
end

function spell2_32417(pUnit, Event) --@Whirlwind,Self--
pUnit:FullCastSpellOnTarget(48280,pUnit)
pUnit:RegisterEvent('Sorts_32417', 2000, 1)
end

function Sorts_32417(pUnit, Event)
local choix_sorts_32417 = math.random(0, 2)
if choix_sorts_32417 == 0 then
pUnit:RegisterEvent('spell0_32417', 1, 1)
end
if choix_sorts_32417 == 1 then
pUnit:RegisterEvent('spell1_32417', 1, 1)
end
if choix_sorts_32417 == 2 then
pUnit:RegisterEvent('spell2_32417', 1, 1)
end
end

function mob32417_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_32417', math.random(1500, 3000), 1)
end

function mob32417_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32417_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32417_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(32417, 1, 'mob32417_Action')
RegisterUnitEvent(32417, 2, 'mob32417_Leave')
RegisterUnitEvent(32417, 3, 'mob32417_Kill')
RegisterUnitEvent(32417, 4, 'mob32417_Die')
